<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../vue.js"></script>
    <style>
        .box {
            height: 100px;
            width: 100px;
            background-color: red;
        }
    </style>
</head>

<body>
    <div id="app">

        <div>
            手机号: <input type="text" v-model.number="tel">
        </div>
        <div>
            姓名: <input type="text" v-model.trim="name">
        </div>
        <div>
            用户名: <input type="text" v-model.lazy="name1">
        </div>
        <div>用户名:{{name1}}</div>
        <div>
            <button @click="submit">点击提交</button>
        </div>

    </div>
</body>
<script>
    new Vue({
        el: '#app',
        data: {
            tel: '',
            name: '',
            name1: ''

        },
        methods: {

            submit() {
                console.log(this.tel);
                console.log(this.name);
            }
        }
    })
</script>

</html>